From: Khalid Abu Shawarib Date: Mon, 25 Aug 2025 18:08:54 +0000 (+0300) Subject: search: Make overview application search results grid RTL aware X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~88^2~9^2^2~4 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=caa9437538ef6e2af2f27ad39bd978ac150147d4;p=gnome-shell.git search: Make overview application search results grid RTL aware Part-of: (cherry picked from commit 92dc36e7fe14c0e8fba8b297d6a9674f16a7d6be) --- diff --git a/js/ui/search.js b/js/ui/search.js index 620ad3ddb..3d13dc9da 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -397,6 +397,7 @@ const GridSearchResultsLayout = GObject.registerClass({ vfunc_allocate(container, box) { const width = box.get_width(); + const ltr = container.get_text_direction() !== Clutter.TextDirection.RTL; const childBox = new Clutter.ActorBox(); let accumulatedWidth = 0; @@ -414,7 +415,11 @@ const GridSearchResultsLayout = GObject.registerClass({ const [childWidth] = child.get_preferred_width(-1); const [childHeight] = child.get_preferred_height(-1); - childBox.set_origin(accumulatedWidth, 0); + if (ltr) + childBox.set_origin(accumulatedWidth, 0); + else + childBox.set_origin(width - accumulatedWidth - childWidth, 0); + accumulatedWidth += childWidth; if (accumulatedWidth <= width)